//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by 王道林 on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)setWdl_x:(CGFloat)wdl_x
{
    CGRect rect = self.frame;
    rect.origin.x = wdl_x;
    self.frame = rect;
}


- (CGFloat)wdl_x
{
    return self.frame.size.width;
}


- (void)setWdl_y:(CGFloat)wdl_y
{
    CGRect rect = self.frame;
    rect.origin.y = wdl_y;
    self.frame = rect;
}
- (CGFloat)wdl_y
{
    return self.frame.origin.y;
}

- (void)setWdl_width:(CGFloat)wdl_width
{
    CGRect rect = self.frame;
    rect.size.width = wdl_width;
    self.frame = rect;
}
- (CGFloat)wdl_width
{
    return self.frame.size.width;
}

- (void)setWdl_height:(CGFloat)wdl_height
{
    CGRect rect = self.frame;
    rect.size.height = wdl_height;
    self.frame = rect;
}
- (CGFloat)wdl_height
{
    return self.frame.size.height;
}

- (void)setCenter_x:(CGFloat)center_x
{
    CGPoint center = self.center;
    center.x = center_x;
    self.center = center;
}

- (CGFloat)center_x
{
    return self.center.x;
}



- (void)setCenter_y:(CGFloat)center_y
{
    CGPoint center = self.center;
    center.y = center_y;
    self.center = center;

}

- (CGFloat)center_y
{
    return self.center.y;
}

@end
